import Vue from 'vue'
import Router from 'vue-router'
import home from '@/components/home' //首页
import vip from '@/components/vip' //会员
import shopcart from '@/components/shopcart' //购物车
import searchs from '@/components/searchs' //搜索
import newslist from '@/components/homexinwen/newslist' //新闻列表
import newsinfo from '@/components/homexinwen/newsinfo' //新闻详情
import photolist from '@/components/homephoto/photolist' //图片分享
import photoinfo from '@/components/homephoto/photoinfo' //图片详情
import shoplist from '@/components/homeshop/shoplist' //商品列表
import shopinfo from '@/components/homeshop/shopinfo' //商品详情
import jieshao from '@/components/homeshop/jieshao' //商品图文介绍
import pinglun from '@/components/homeshop/pinglun' //商品评论
Vue.use(Router)

export default new Router({
  routes: [{
    path: '',
    component: home
  }, {
    path: '/home', //首页路由
    name: 'home',
    component: home,
  }, {
    path: '/home/newslist',
    name: 'newslist', //新闻列表
    component: newslist
  }, {
    path: '/home/newsinfo/:id', //新闻详情
    name: "newsinfo",
    component: newsinfo
  }, {
    path: '/home/photolist',
    name: 'photolist', //图片列表
    component: photolist
  }, {
    path: '/home/photoinfo/:id', //图片详情
    name: "photoinfo",
    component: photoinfo
  }, {
    path: '/home/shoplist', //商品列表
    name: "shoplist",
    component: shoplist
  }, {
    path: '/home/shopinfo/:id', //商品详情
    name: "shopinfo",
    component: shopinfo
  }, {
    path: '/home/jieshao/:id', //商品图文介绍
    name: "jieshao",
    component: jieshao
  }, {
    path: '/home/pinglun/:id', //商品评论
    name: "pinglun",
    component: pinglun
  }, {
    path: '/vip', //会员
    name: 'vip',
    component: vip
  }, {
    path: '/shopcart', //购物车
    name: 'shopcart',
    component: shopcart
  }, {
    path: '/searchs', //搜索
    name: 'searchs',
    component: searchs
  }, ],
  mode: "history", //清除地址栏的#号
  linkActiveClass: 'mui-active' //覆盖默认高亮的类    把默认的mui-active删除

})
